<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>企业信息</title>
    <link rel="stylesheet" href="../css/common.css">
    <link rel="stylesheet" href="../css/page.css">
    <link rel="stylesheet" href="../css/demo.css">
    <script src="../js/jquery-3.2.1.min.js"></script>
    <script src="../js/media.js"></script>
    <script src="../js/common.js"></script>

    <style>
        .upload_box {
            width: 100%;
            /* margin: 1em auto; */
        }

        .upload_main {}

        .upload_choose {
            /* padding: 1em; */
        }

        .upload_drag_area {
            display: inline-block;
            width: 60%;
            padding: 4em 0;
            margin-left: .5em;
            border: 1px dashed #ddd;
            background: #fff url(drag.png) no-repeat 20px center;
            color: #999;
            text-align: center;
            vertical-align: middle;
        }

        .upload_drag_hover {
            border-color: #069;
            box-shadow: inset 2px 2px 4px rgba(0, 0, 0, .5);
            color: #333;
        }

        .upload_preview {
            background-color: #fff;
            overflow: hidden;
            _zoom: 1;
            position: absolute !important;
            /* float: left; */
            /* z-index: 99999; */
            width: 55vw;
            height: 31vw;
            left: 17vw;
        }

        .upload_append_list {
            /* height: 300px; */
            margin-right: 8px;
            width: 100%;
            height: 100%;
            /* float: left; */
            position: absolute !important;
            z-index: 999999;
        }

        .upload_append_list>p {
            width: 100%;
            height: 100%;
        }

        .upload_delete {
            margin-left: 2em;
            background: url('../img/删除@2x.png') no-repeat center;
            position: absolute;
            top: 0;
            right: 0;
            display: inline-block;
            width: 12px;
            height: 12px;
            background-size: contain;
        }

        .upload_image {
            /* max-height: 250px;
            padding: 5px; */
        }

        .upload_submit {
            /* padding-top: 1em; */
            /* padding-left: 1em; */
        }

        .upload_submit_btn {
            display: none;
            height: 32px;
            font-size: 14px;
        }

        .upload_loading {
            height: 250px;
            background: url(http://www.zhangxinxu.com/study/image/loading.gif) no-repeat center;
        }

        .upload_progress {
            display: none;
            padding: 5px;
            border-radius: 10px;
            color: #fff;
            background-color: rgba(0, 0, 0, .6);
            position: absolute;
            left: 25px;
            top: 45px;
        }
    </style>
</head>

<body>
    <!--头部-->
    <div class="public-header flex">
        <!--<span class="public-header-left-search"></span>-->
        <span class="public-header-left-back"></span>
        <span class="public-header-center">企业信息</span>
        <span class="public-header-right"></span>
    </div>

    <!--正文-->

    <div class="Corporate-Information bc-gray">
        <h6>企业信息认证<span>(请上传真实的企业信息，认证通过后将无法修改)</span></h6>
        <ul>
            <li>
                <span>企业名称</span>
                <input type="text" placeholder="请输入企业名称" id="enterprise_name">
            </li>
            <li>
                <span>法人姓名</span>
                <input type="text" placeholder="请输入法人姓名" id="legal_person_name">
            </li>
            <li>
                <span>身份证号</span>
                <input type="text" placeholder="请输入法人身份证号" id="enterprise_IdCard">
            </li>

        </ul>

        <div class="section-1 section">
            <h5>法人身份证正面照</h5>
            <div class="img">
                <div id="body" class="light">
                    <div id="content" class="show">
                        <div class="demo">
                            <form id="uploadForm" action="http://192.168.1.111:8090/ZITAOHUI/store/enterprise/authentication" method="post" enctype="multipart/form-data">
                                <div class="upload_box">
                                    <div class="upload_main">
                                        <div id="preview" class="upload_preview"></div>
                                        <div class="upload_choose">
                                            <img src="../img/上传照片@2x.png" alt="" style=' width: 54vw;display: block;height: 30vw;margin: 0 auto;' class="add_img">
                                           
                                        </div>

                                    </div>
                                 
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
                <em>上传正面照（清晰）</em>
            </div>

        </div>
        <div class="section-2 section">
            <h5>法人身份证反面照</h5>
            <div class="img">
                <input type="image" src="../img/上传照片@2x.png" class="add_img2 add_img">
                <em>上传反面照（清晰）</em>
            </div>
        </div>
        <div class="section-3 section">
            <h5>法人手持身份证照</h5>
            <div class="img">
                <input type="image" src="../img/上传照片@2x.png" class="add_img3 add_img">
                <em>上传手持身份证照（清晰）</em>
            </div>
        </div>
        <div class="Corporate-Information ">
            <h6>店铺设置<span>(请上传真实的企业信息，认证通过后将无法修改)</span></h6>
            <ul>
                <li>
                    <span>名称</span>
                    <input type="text" placeholder="请输入店铺名称" id="store_name">
                </li>
                <li>

            </ul>
            <div class="section-2 section">
                <h5>店铺logo</h5>
                <div class="img">
                    <input type="image" src="../img/上传企业执照@2x.png" class="add_img4 add_img">
                    <em>上传店铺logo（尺寸：X*X）</em>
                </div>

            </div>
            <p class="p2">店铺介绍</p>
            <textarea name="" id="" cols="30" rows="10" placeholder="" id="store_des">
                    
                </textarea>


        </div>
        <div class="button">
            提交
        </div>
    </div>



    <script>
        $(function () {
            $.ajax({
                url: base_url + 'ZITAOHUI/user/legalize',
                data: {
                    uid: u_id,
                    type: 2
                },
                success: (data) => {
                    console.log(data)
                    $('.button').hide();
                    let datas = data.extend.data;
                    $('#enterprise_name').val(datas.enterprise_name);
                    $('#legal_person_name').val(datas.legal_person_name);
                    $('#enterprise_IdCard').val(datas.enterprise_IdCard);
                    $('#store_name').val(datas.store_name)
                    $('#store_des').val(datas.store_describe)
                    let img = document.getElementsByClassName('add_img')
                    img[0].src = datas.legal_person_idcard_Positive;
                    img[1].src = datas.legal_person_idcard_Back;
                    img[3].src = datas.store_image
                    console.log(datas.store_describe)

                },
                error: (data) => {
                    console.log(data)
                   
                }
            })
        })
    </script>
   
</body>

</html>